Skip to content

Backport of structs: fix test for empty DNS configuration into release/1.7.x#20255

Merged
tgross merged 1 commit intorelease/1.7.xfrom
backport/b-dns-config-diff/steadily-sweet-honeybee
Mar 29, 2024
Merged

Backport of structs: fix test for empty DNS configuration into release/1.7.x#20255
tgross merged 1 commit intorelease/1.7.xfrom
backport/b-dns-config-diff/steadily-sweet-honeybee

Conversation

@hc-github-team-nomad-core
Copy link
Copy Markdown
Contributor

Backport

This PR is auto-generated from #20233 to be assessed for backporting due to the inclusion of the label backport/1.7.x.

The below text is copied from the body of the original PR.


The DNSConfig.IsZero method incorrectly returns true if any of the fields are empty, rather than if all of them are empty.

The only code path that consumes this method is on the client, where it's used as part of equality checks on the allocation network status to set the priority of allocation updates to the server. Hypothetically, if the network hook modified only the DNS configuration and no task states were emitted, it would be possible to miss an allocation update. In practice this appears to be impossible, but we should fix the bug so that there aren't errors in future consumers.


  • Backported only to 1.6.x and 1.7.x because this code doesn't exist in 1.5.x.
  • I don't have a changelog here because this isn't user-visible as far as I can tell

Overview of commits

@vercel vercel bot temporarily deployed to Preview – nomad March 29, 2024 14:53 Inactive
@tgross tgross merged commit a1918e2 into release/1.7.x Mar 29, 2024
@tgross tgross deleted the backport/b-dns-config-diff/steadily-sweet-honeybee branch March 29, 2024 15:10
@github-actions
Copy link
Copy Markdown

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants